/**
* _gtk_css_lookup_resolve:
* @lookup: the lookup
+ * @parent: the parent properties to look up inherited values from or %NULL
+ * if none
*
* Resolves the current lookup into a styleproperties object. This is done
* by converting from the "winning declaration" to the "computed value".
* Returns: a new #GtkStyleProperties
**/
GtkStyleProperties *
-_gtk_css_lookup_resolve (GtkCssLookup *lookup)
+_gtk_css_lookup_resolve (GtkCssLookup *lookup,
+ GtkStyleContext *parent)
{
GtkStyleProperties *props;
guint i, n;
g_return_val_if_fail (lookup != NULL, NULL);
+ g_return_val_if_fail (parent == NULL || GTK_IS_STYLE_CONTEXT (parent), NULL);
n = _gtk_style_property_get_count ();
props = gtk_style_properties_new ();
#include <glib-object.h>
#include "gtk/gtkbitmaskprivate.h"
+#include "gtk/gtkstylecontext.h"
#include "gtk/gtkstyleproperties.h"
void _gtk_css_lookup_set (GtkCssLookup *lookup,
guint id,
const GValue *value);
-GtkStyleProperties * _gtk_css_lookup_resolve (GtkCssLookup *lookup);
+GtkStyleProperties * _gtk_css_lookup_resolve (GtkCssLookup *lookup,
+ GtkStyleContext *context);
G_END_DECLS
}
}
- style_data->store = _gtk_css_lookup_resolve (lookup);
+ style_data->store = _gtk_css_lookup_resolve (lookup, priv->parent);
_gtk_style_properties_set_color_lookup_func (style_data->store,
gtk_style_context_color_lookup_func,
context);